package com.yunji.order.emuns;

import lombok.Getter;

/**
 * @author : peter-zhu
 * @date : 2025/4/11 16:26
 * @description : TODO
 **/
@Getter
public enum PayoutStatusEnum {
    NOT_EXISTS(-100, "无"),
    APPLYING(1, "待审核"),
    DEPOSIT(2, "待转账"),
    REJECTED(3, "已驳回"),
    SUCCESS(4, "提现成功"),
    FAILURE(5, "提现失败"),
    CLOSED(6, "已关闭");

    private final Integer code;
    private final String value;

    PayoutStatusEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static PayoutStatusEnum get(int code) {
        for (PayoutStatusEnum status : values()) {
            if (status.code == code) {
                return status;
            }
        }
        return NOT_EXISTS;
    }
}
